<template>
  <!-- <div class="goodList">
    <router-link
      :to="{ path: '/detail/' + item.id }"
      class="item acea-row row-between-wrapper"
      v-for="(item, index) in goodList"
      :key="index"
    >
      <div class="pictrue">
        <img :src="item.image" class="image" />
        <img
          src="@assets/images/one.png"
          class="numPic"
          v-if="isSort === true && index === 0"
        />
        <img
          src="@assets/images/two.png"
          class="numPic"
          v-if="isSort === true && index === 1"
        />
        <img
          src="@assets/images/three.png"
          class="numPic"
          v-if="isSort === true && index === 2"
        />
      </div>
      <div class="underline">
        <div class="text">
          <div class="line1">{{ item.store_name }}</div>
          <div class="money font-color-red">
            ￥<span class="num">{{ item.price }}</span>
          </div>
          <div class="vip-money acea-row row-middle">
            <div class="vip" v-if="item.vip_price && item.vip_price > 0">
              ￥{{ item.vip_price || 0
              }}<img src="@assets/images/vip.png" class="image" />
            </div>
            <span class="num">已售{{ item.sales }}{{ item.unit_name }}</span>
          </div>
        </div>
      </div>
      <div
        class="iconfont icon-gouwuche cart-color acea-row row-center-wrapper"
      ></div>
    </router-link>
  </div> -->

  <div class="p-list acea-row " >
          <div class="l-item" v-for="(item, index) in goodList" :key="index">
              <router-link
              :to="{ path: '/detail/' + item.id }"
              >
            <el-card :body-style="{ padding: '0px' }" shadow="hover">
                <img :src="item.image" class="image" />
                <img
                  src="@assets/images/one.png"
                  class="numPic"
                  v-if="isSort === true && index === 0"
                />
                <img
                  src="@assets/images/two.png"
                  class="numPic"
                  v-if="isSort === true && index === 1"
                />
                <img
                  src="@assets/images/three.png"
                  class="numPic"
                  v-if="isSort === true && index === 2"
                />
              <div class="bd acea-row">
                <div class="prdtTag" v-if="false"></div>
                <div class="name">{{item.store_name}}</div>
                <div class="price">¥{{ item.price }}</div>
                <router-link
                :to="{
                  path: '/detail/' + item.id
                }">
                <div class="addCar"><el-button class="btn">加入购物车</el-button></div>
                </router-link>
              </div>
            </el-card>
          </router-link>
          </div>
    </div>
</template>
<script>
export default {
  name: "GoodList",
  props: {
    goodList: {
      type: Array,
      default: () => []
    },
    isSort: {
      type: Boolean,
      default: true
    }
  },
  data: function() {
    return {};
  }
};
</script>
<style scoped>
   .p-list {
    margin-top: 20px;
  }
   .p-list .noCommodity {
    width: 1010px;
    height: 401px;
    background-color: #fff;
  }
   .p-list .noCommodity  .noPictrue {
    width: 400px;
    height: 350px;
    margin: 0 auto;
  }
   .p-list .noCommodity  .noPictrue img {
    width: 100%;
    height: 100%;
  }
   .p-list .l-item {
    width: 245px;
    height: 401px;
    margin:0  3px ;
  }
   .p-list .l-item .image {
    width: 245px;
    height: 245px;
  }
   .p-list .l-item  .bd {
    width: 245px;
    height: 120px;
    text-align: center;
  }
   .p-list .l-item .bd .prdtTag {
    width: 200px;
    height: 20px;
    margin: 0 auto;
  }
   .p-list .l-item .bd .name {
    width: 166px;
    margin: 0 auto 4px;
    max-height: 40px;
    line-height: 20px;
    overflow: hidden;
    font-family: "Microsoft Yahei","微软雅黑",verdana;
    font-size: 13px;
    font-weight: 700;
    color: #333;
  }
   .p-list .l-item .bd .name:hover {
    color: #b4a078;
  }
   .p-list .l-item .bd .price {
    width: 245px;
    height: 21px;
    overflow: hidden;
    height: 20px;
    line-height: 22px;
    color: #d4282d;
    font-size: 13px;
  }
   .p-list .l-item .bd .addCar {
    width: 245px;
    height: 32px;
  }
   .p-list .l-item .bd .addCar .btn {
    background-color:#b4a078;
    border: 1px solid #b4a078;
    color: #fff;
    font-weight: 500;
  }
</style>